package com.mdd.front.validate.collect;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 服务收藏参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "收藏请求对象",description = "收藏请求对象")
public class GoodsCollectParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create{}
    public interface update{}
    public interface delete{}

    @ApiModelProperty(value = "id")
    @NotNull(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Long id;

    @ApiModelProperty(value = "用户id",required = true)
    @DecimalMin(value = "0", message = "userId参数值不能少于0", groups = {create.class, update.class})
    private Long userId;

    @ApiModelProperty(value = "服务id",required = true)
    @NotNull(message = "goodsId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "goodsId参数值不能少于0", groups = {create.class, update.class})
    private Long goodsId;

}
